package part05_原型模式.p01_传统方法;

/**
 * @ClassName: ClientClone
 * @Author: AllenSun
 * @Date: 2019/12/6 20:35
 */
public class ClientClone {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("tom",1,"白色");

        Sheep sheep1 = new Sheep(sheep.getName(),sheep.getAge(),sheep.getColer());
        Sheep sheep2 = new Sheep(sheep.getName(),sheep.getAge(),sheep.getColer());
        Sheep sheep3 = new Sheep(sheep.getName(),sheep.getAge(),sheep.getColer());
        Sheep sheep4 = new Sheep(sheep.getName(),sheep.getAge(),sheep.getColer());
        Sheep sheep5 = new Sheep(sheep.getName(),sheep.getAge(),sheep.getColer());
        Sheep sheep6 = new Sheep(sheep.getName(),sheep.getAge(),sheep.getColer());
        Sheep sheep7 = new Sheep(sheep.getName(),sheep.getAge(),sheep.getColer());
    }
}

class Sheep{
    private String name;
    private int age;
    private String coler;

    public Sheep(String name, int age, String coler) {
        this.name = name;
        this.age = age;
        this.coler = coler;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public String getColer() {
        return coler;
    }
}
